this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-search"]=function(e){function t(t){for(var o,a,n=t[0],s=t[1],i=t[2],u=0,d=[];u<n.length;u++)a=n[u],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&d.push(r[a][0]),r[a]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);for(b&&b(t);d.length;)d.shift()();return l.push.apply(l,i||[]),c()}function c(){for(var e,t=0;t<l.length;t++){for(var c=l[t],o=!0,n=1;n<c.length;n++){var s=c[n];0!==r[s]&&(o=!1)}o&&(l.splice(t--,1),e=a(a.s=c[0]))}return e}var o={},r={42:0},l=[];function a(t){if(o[t])return o[t].exports;var c=o[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.m=e,a.c=o,a.d=function(e,t,c){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(c,o,function(t){return e[t]}.bind(null,o));return c},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var n=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=n.push.bind(n);n.push=t,n=n.slice();for(var i=0;i<n.length;i++)t(n[i]);var b=s;return l.push([536,0]),c()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=window.wp.compose},2:function(e,t){e.exports=window.wp.components},3:function(e,t){e.exports=window.wc.wcSettings},316:function(e,t){},317:function(e,t){},5:function(e,t){e.exports=window.wp.blockEditor},536:function(e,t,c){e.exports=c(590)},590:function(e,t,c){"use strict";c.r(t);var o=c(0),r=c(5),l=c(6),a=c(1),n=c(70),s=c(626),i=c(3),b=c(80),u=c(2),d=c(7),p=(c(316),c(317),c(4)),w=c.n(p),h=({attributes:{label:e,placeholder:t,formId:c,className:r,hasLabel:l,align:n}})=>{const s=w()("wc-block-product-search",n?"align"+n:"",r);return Object(o.createElement)("div",{className:s},Object(o.createElement)("form",{role:"search",method:"get",action:i.HOME_URL},Object(o.createElement)("label",{htmlFor:c,className:l?"wc-block-product-search__label":"wc-block-product-search__label screen-reader-text"},e),Object(o.createElement)("div",{className:"wc-block-product-search__fields"},Object(o.createElement)("input",{type:"search",id:c,className:"wc-block-product-search__field",placeholder:t,name:"s"}),Object(o.createElement)("input",{type:"hidden",name:"post_type",value:"product"}),Object(o.createElement)("button",{type:"submit",className:"wc-block-product-search__button","aria-label":Object(a.__)("Search","woocommerce")},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))},m=c(11),g=Object(m.withInstanceId)((({attributes:{label:e,placeholder:t,formId:c,className:l,hasLabel:n,align:s},instanceId:i,setAttributes:b})=>{const d=w()("wc-block-product-search",s?"align"+s:"",l);return Object(o.useEffect)((()=>{c||b({formId:`wc-block-product-search-${i}`})}),[c,b,i]),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(r.InspectorControls,{key:"inspector"},Object(o.createElement)(u.PanelBody,{title:Object(a.__)("Content","woocommerce"),initialOpen:!0},Object(o.createElement)(u.ToggleControl,{label:Object(a.__)("Show search field label","woocommerce"),checked:n,onChange:()=>b({hasLabel:!n})}))),Object(o.createElement)("div",{className:d},!!n&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("label",{className:"screen-reader-text",htmlFor:"wc-block-product-search__label"},Object(a.__)("Search Label","woocommerce")),Object(o.createElement)(r.PlainText,{className:"wc-block-product-search__label",id:"wc-block-product-search__label",value:e,onChange:e=>b({label:e}),style:{backgroundColor:"transparent"}})),Object(o.createElement)("div",{className:"wc-block-product-search__fields"},Object(o.createElement)(u.TextControl,{className:"wc-block-product-search__field input-control",value:t,placeholder:Object(a.__)("Enter search placeholder text","woocommerce"),onChange:e=>b({placeholder:e})}),Object(o.createElement)("button",{type:"submit",className:"wc-block-product-search__button","aria-label":Object(a.__)("Search","woocommerce"),onClick:e=>e.preventDefault(),tabIndex:-1},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))}));const f=Object(i.getSettingWithCoercion)("isBlockVariationAvailable",!1,b.a),_={hasLabel:{type:"boolean",default:!0},label:{type:"string",default:Object(a.__)("Search","woocommerce")},placeholder:{type:"string",default:Object(a.__)("Search products…","woocommerce")},formId:{type:"string",default:""}},k={label:_.label.default,buttonText:_.label.default,placeholder:_.placeholder.default,query:{post_type:"product"}};Object(d.registerBlockType)("woocommerce/product-search",{title:Object(a.__)("Product Search","woocommerce"),icon:{src:Object(o.createElement)(n.a,{icon:s.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woocommerce")],description:Object(a.__)("A search box to allow customers to search for products by keyword.","woocommerce"),supports:{align:["wide","full"],inserter:!f},attributes:_,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>"woocommerce_product_search"===e&&!(null==t||!t.raw),transform:({instance:e})=>Object(d.createBlock)("woocommerce/product-search",{label:e.raw.title||k.label})}]},deprecated:[{attributes:_,save:e=>Object(o.createElement)("div",null,Object(o.createElement)(h,{...e}))}],edit:f?({clientId:e})=>{const{replaceBlocks:t}=Object(l.useDispatch)(r.store),c=Object(l.useSelect)((t=>t("core/block-editor").getBlockAttributes(e)),[e]),n=[Object(o.createElement)(u.Button,{key:"update",onClick:()=>{t(e,Object(d.createBlock)("core/search",{label:(null==c?void 0:c.label)||k.label,buttonText:k.buttonText,placeholder:(null==c?void 0:c.placeholder)||k.placeholder,query:k.query}))},variant:"primary"},Object(a.__)("Upgrade Block","woocommerce"))];return Object(o.createElement)(r.Warning,{actions:n,className:"wc-block-components-actions"},Object(a.__)("This version of the Product Search block is outdated. Upgrade to continue using.","woocommerce"))}:g,save:()=>null}),f&&Object(d.registerBlockVariation)("core/search",{name:"woocommerce/product-search",title:Object(a.__)("Product Search","woocommerce"),icon:{src:Object(o.createElement)(n.a,{icon:s.a,className:"wc-block-editor-components-block-icon"})},isActive:(e,t)=>{var c;return(null===(c=e.query)||void 0===c?void 0:c.post_type)===t.query.post_type},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woocommerce")],description:Object(a.__)("A search box to allow customers to search for products by keyword.","woocommerce"),attributes:k})},6:function(e,t){e.exports=window.wp.data},7:function(e,t){e.exports=window.wp.blocks},80:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"boolean"==typeof e},9:function(e,t){e.exports=window.wp.primitives}});